/*
 * ----------------------------------------------------------------------------
 *  (C) Copyright European Telecommunications Standards Institute, 2001.
 *  All Rights Reserved.
 *
 *  All copies of this program, whether in whole or in part, and whether
 *  modified or not, must display this and all other embedded copyright
 *  and ownership notices in full.
 *
 * ----------------------------------------------------------------------------
 */
package org.etsi.ttcn.tri;

import java.io.Serializable;

/** 
    A value of type TriExceptionType is an encoded type and value of
    an exception which either is to be send to the SUT or has been
    received from the SUT. This abstract type is used in procedure
    based TRI communication operations.
*/
public interface TriException extends Serializable {

    /** Returns the exception encoded according to the coding rules
	defined in the TTCN-3 specification.
    */
    public byte[]  getEncodedException();

    /** Sets the encoded exception representation of this TriException
	to exc.
    */
    public void    setEncodedException(byte[] message);

    /** Compares exc with this TriException for equality. Returns true
	if and only if both exceptions have the same encoded
	representation, false otherwise.
    */
    public boolean equals(TriException exc);
}
